package com.jt.controller;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller

    public class RequestController {
        @GetMapping("/getA")
        public String getA(Integer id){
            System.out.println("aaaa"+id);

//            return "forward:/getB";转发
            return "redirect:/getB";
        }
        @GetMapping("/getB")
        @ResponseBody
        public String getB(Integer id){
            System.out.println("bbbbb"+id);
            return "busss"+id;
        }
    }


